import React, {useState} from 'react'

export default function Video() {
  //声明状态
  let [src, setSrc] = useState('http://api.xiaohigh.com/video/random');

  //声明事件回调
  let change = () => {
    //更新状态
    setSrc('http://api.xiaohigh.com/video/random?t='+Date.now());
  }

  return (
    <div>
        <video height="500" controls src={src} onClick={change}></video>
    </div>
  )
}
